package com.iflytek.universitymanagement.service.impl;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.iflytek.universitymanagement.domain.Admin;
import com.iflytek.universitymanagement.domain.Reply;
import com.iflytek.universitymanagement.mapper.ReplyMapper;
import com.iflytek.universitymanagement.service.ReplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReplyServiceImpl extends ServiceImpl<ReplyMapper,Reply> implements ReplyService {
    @Autowired
    private ReplyMapper replyMapper;

    @Override
    public List<Reply> getRepliesByCommentId(Integer commentId) {
        return replyMapper.findRepliesByCommentId(commentId);
    }

    @Override
    public void addReply(Reply reply) {
        replyMapper.insert(reply);
    }
}
